<template> <!-- vue实例外创建 -->
  <div>
    <!-- 视图 -->
    <el-card class="box-card">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>{{ title }}</el-breadcrumb-item>
      </el-breadcrumb>
      <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="roleName" label="角色名称">
        </el-table-column>
        <el-table-column prop="roleDesc" label="角色描述">
        </el-table-column>
        <el-table-column prop="id" label="权限id">
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<script>
import { GetRoles } from '@/api/role';
export default {
  data() {
    return {
      tableData: [],
      
        title: '',
      }
  },
  methods:{
// 获取列表
async getdata() {
      let {data,meta} = await GetRoles(this.info)
      if (meta.status != 200) return this.$message.error(meta.msg)
      this.tableData = data
    console.log(data);
    
      // this.total = data.total
    },
  },
  mounted() {
    this.getdata()
    this.title = localStorage.getItem('title')
  }
}
</script>
<style scoped>
</style>